Skip to main content

Full text of "Arduino"

See other formats



Make Projects 

build, hack, tweak, share, discover,' 


Written By: Taylor 


Arduino microcontroller (1) 
CdS Photoresistor (1) 
Potentiometer. 100kQ (2) 
Jumper wires (1) 
1 0K Resistor (1) 


This simple project uses an Arduino, a photoresistor, 2 potentiometers, and a resistor and 
uses basic serial communication between the Arduino and your computer. 

Basically, the user can draw by controlling two potentiometers (drawing knobs) and the 
photoresistor determines how dark the circle will be drawn. 

© Make Projects Page 1 of 3 




f ■ t r M> nr jMi ■ ri in run Lin raj pi 
———— —— |i iriini ftiru fi iiiiiiii 

?j : j j :: jTT 

a _,■ ■ I ..Jtl iiuj I.. . .1... 

. I . | . . . . | ..».■ . . . ,,«]... 

Set up two potentiometers next to each other. They will act as the horizontal and vertical 
controls for the Processing Circle-A-Sketch. 

• The pin on one end will go to a 5V source, the middle pin will go to an analog pin on the 
Arduino (either AO or A1) and the other end pin will go to ground ("Gnd"). 


• Create a voltage divider with the 10k resistor. 

<j Arduino Filt Edit Sketch Tools Help 

A '" N <*i 

tm ©© Situ [SB 

O * ^ HB 

lir^trtr-duino I Arduino Wit 

Connect the Arduino to your 

Verify/Compile the code and then 
upload it to the Arduino board. 

© Make Projects 

Page 2 of 3 

Circle-A-S ketch 

• Download and install Processing. 

• Open Processing and upload the 
Processing code. 

• Click the Run button and get ready 
to sketch! 



firjtArdi f^ *v 


:< -icr end 

lay 26 281 

firstArduino I Processing 1,2.1 

Modified f 
David A. H 
Casey Reus 

http ://prc 


import pro 

r L rat xWn 
r loat yVtiL 
f loat tone 
boo Leon pr 

Serial nyP< 

void -setup 



print In ( 
■yPfcrt J 

void drawd 


. . fill based on the photoresistor "s input 
ft LLfteneValue}; 

Draw and experiment, 

This document was last generated on 201 2-1 0-31 1 0:21 :29 AM. 

© Make Projects 

Page 3 of 3